/**
 * Created with PyCharm.
 * User: Amanda
 * Date: 14-9-10
 * Time: 下午4:03
 * To change this template use File | Settings | File Templates.
 */
function showLine(){
    $('#right_show').highcharts({ 
        title: {
            text: object1.d2,
            x: -20 //center
        },
        subtitle: {
            text: '',
            x: -20
        },
        xAxis: {
            categories: object2['latitude_d']
        },
        yAxis: {
            title: {
                text: object1['depth']
            },
            plotLines: [{
                value: 0,
                width: 1,
                color: '#808080'
            }]
        },
        tooltip: {
            valueSuffix: ''
        },
        legend: {
            layout: 'vertical',
            align: 'right',
            verticalAlign: 'middle',
            borderWidth: 0
        },
        series: [{
            name: object1['latitude'],
            data: object2['depth_d']
        }]
    });
}

/**
 * Created with PyCharm.
 * User: Amanda
 * Date: 14-9-10
 * Time: 下午4:06
 * To change this template use File | Settings | File Templates.
 */
function showPost() {
    $('#right_show').highcharts({
        chart: {
            type: 'column'
        },
        title: {
            text: object1.d2
        },
        subtitle: {
            text: ''
        },
        xAxis: {
            categories: object3['latitude_d']
        },
        yAxis: {
            min: 0,
            title: {
                text: object1['depth']
            }
        },
        tooltip: {
            headerFormat: '<span style="font-size:10px">{point.key}</span>',
            pointFormat: '<table><tbody><tr><td style="color:{series.color};padding:0">{series.name}: </td><td style="padding:0"><b>{point.y:.1f}</b></td></tr></tbody></table>' +
                '',
            footerFormat: '',
            shared: true,
            useHTML: true
        },
        plotOptions: {
            column: {
                pointPadding: 0.2,
                borderWidth: 0
            }
        },
        series: [{
            name: object1['latitude'],
            data: object3['depth_d']

        }]
    });
};

/**
 * Created with PyCharm.
 * User: Amanda
 * Date: 14-9-10
 * Time: 下午4:09
 * To change this template use File | Settings | File Templates.
 */
function showScorll() {
    $('#right_show').highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: object1.d2
        },
        tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    color: '#000000',
                    connectorColor: '#000000',
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %'
                }
            }
        },
        series: [{
            type: 'pie',
            name: '百分比',
            data: object3['list2']
        }]
    });
};